﻿F = coroutine.wrap(function()
   while true do
     local t = setmetatable({}, {
       __eq = function(...)
         return coroutine.yield(...)
       end })
     local t2 = setmetatable({}, getmetatable(t))
     print("Are they equal?", t == t2)
   end
end)
print(F()) --> table, table (In 5.1, gives error: attempt to yield across metamethod/C-call boundary)
F(true) --> Are they equal? true
F(false) --> Are they equal? false

--[===[

	

]===]